﻿//
// (C) Copyright 2009 Irantha Suwandarathna (irantha@gmail.com)
// All rights reserved.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EffiProzDB.Lib;


namespace EffiProzDB.RowIO
{
    /**
   * Public interface for writing the data for a database row.
   *
   * @author sqlbob@users (RMP)
   * @author fredt@users
   * @version 1.7.2
   * @since 1.7.0
   */
    public interface RowOutputInterface
    {

        void writeEnd();

        void writeSize(int size);

        void writeType(int type);

        void writeString(string value);

        void writeShortData(short i);

        void writeIntData(int i);

        void writeIntData(int i, int position);

        void writeLongData(long i);

        void writeRow(Object[] data, Table t);

        void writeData(Object[] data, Table t);

        void writeData(int l, int[] types, Object[] data, IList<Column> cols,
                       int[] primarykeys);

        // independent of the this object, calls only a static method
        int getSize(CachedRow row);

        // returns the underlying HsqlByteArrayOutputStream
        HsqlByteArrayOutputStream getOutputStream();

        // resets the byte[] buffer, ready for processing new row
        void reset();

        // returns the current size
        int size();
    }
}

